package com.bosssoft.trainee.nontax.service;

import com.bosssoft.trainee.nontax.entity.dto.UserDto;
import com.bosssoft.trainee.nontax.entity.dto.UserInfo;
import com.bosssoft.trainee.nontax.entity.vo.UserVo;
import java.util.List;

public interface UserService {

    /**
     * @Description: 通过UserDTO 获取用户信息 userinfo
     * @param user user dto
     * @return: com.bosssoft.trainee.nontax.entity.dto.UserInfo
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:19
     */
    UserInfo getUserInfoFromUser(UserDto user);

    /**
     * @Description: 获取该角色授予的所有用户
     * @param roleId role id
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.vo.UserVo>
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:19
     */
    List<UserVo> queryAllByRoleId(Integer roleId);

    /**
     * @Description: 通过ID查询单条数据
     * @param userId user id
     * @return: com.bosssoft.trainee.nontax.entity.vo.UserVo
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:20
     */
    UserVo queryById(Integer userId);

    /**
     * @Description: 查询符合条件的所有用户
     * @param user user dto
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.vo.UserVo>
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:21
     */
    List<UserVo> queryByPage(UserDto user);


    /**
     * @Description: 新增数据
     * @param user user dto
     * @return: com.bosssoft.trainee.nontax.entity.vo.UserVo
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:21
     */
    UserVo insert(UserDto user);

    /**
     * @Description: 修改数据
     * @param user user dto
     * @return: com.bosssoft.trainee.nontax.entity.vo.UserVo
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:21
     */
    UserVo update(UserDto user);

    /**
     * @Description: 通过主键删除数据
     * @param userId user id
     * @return: boolean
     * @Author: Luo WenLong
     * @Date: 2022/6/24 21:22
     */
    boolean deleteById(Integer userId);

    /**
     * @Description: 对用户进行软删除
     * @param userId user id
     * @return: int
     * @Author: Luo WenLong
     * @Date: 2022/6/24 17:55
     */
    int deleteByIdSoft(Integer userId);

    String canDeleteUser(Integer userId);
}
